home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2148 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news.production.compuserve.com!news
  2. From: Bill Symmes <71046.623@CompuServe.COM>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: ATTENTION C EXPERTS!! Extern Declarations - NEED HELP!
  5. Date: 19 Jan 1996 14:22:33 GMT
  6. Organization: CompuServe, Inc. (1-800-689-0736)
  7. Message-ID: <4do9f9$ov0$1@mhafn.production.compuserve.com>
  8. References: <4dkp42$k1q@news.cencom.net>
  9.  
  10. CDECL specifies that the function arguments are pushed on the 
  11. stack in reverse order.  This allows the use of functions with a 
  12. variable number of arguments.
  13.  
  14. PASCAL pushes the arguments in regular order.  It generates 
  15. somewhat smaller and faster code but can only be used with a 
  16. fixed number of arguments.
  17.  
  18. printf(), for example, is a CDECL function because the number of 
  19. arguments can vary from one call to the next.
  20.  
  21. The near and far do just as described.  They are required in the 
  22. Intel segmented architecture but are not generally used on 
  23. systems with a flat memory scheme (i.e., no segments).
  24.  
  25. -- 
  26. Bill Symmes                           P*ROM Software Inc
  27. 71046.623@compuserve.com              +1 802 862-7500
  28.                                       +1 802 862-8357 (Fax)    
  29.                                   Burlington VT 05406-4027 
  30.